检查理解:这里有几个问题供您复习所学内容!

  • 点击运行并在用户输入框中输入您的答案。
  • 通过单击正确答案来回答问题。
  • 点击提交接下来继续。

To navigate the page using the TAB key, first press ESC to exit the code editor.

sprite = codesters.Sprite("person1") # question answer = sprite.ask("Did you do your homework?") answer = answer.lower() # check what answer is equal to if answer == "yes": # if answer is yes, do this sprite.go_to(-3, -5) sprite.say("Cool, I can go to the beach!") # check what answer is equal to if answer == "no": # if answer is no, then do this sprite.go_to(3, -5) sprite.say("I better stay home then.")
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)